package com.share.netty.im.client.handler;

import com.share.netty.im.response.MessageResponsePacket;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

import java.util.Date;

/**
 * @author caifan
 * @createTime 2020/5/17
 * @desc:
 */
public class MessageResponseHandler extends SimpleChannelInboundHandler<MessageResponsePacket> {
    @Override
    protected void channelRead0(ChannelHandlerContext ctx, MessageResponsePacket msg) {
        System.out.println(new Date() + ": 收到服务端的消息: " + msg.getMessage());
    }
}
